import myaxios from "../MyAxios";
import BASEURL from "../BaseUrl"

const TCHYURL = BASEURL.TCHYURL
const supplierManagementApi = {
    // 待认证供应商列表
    getAuditSupplierManagementList(params) {
        let url = TCHYURL + '/account/supplier/listAudit'
        return myaxios.get(url, params)
    },
    // 供应商列表 (已认证)
    getSupplierManagementList(params) {
        let url = TCHYURL + '/account/supplier/list'
        return myaxios.get(url, params)
    },
	querySupplierInfo(params) {
	    let url = TCHYURL + '/account/supplier/querySupplierInfo'
	    return myaxios.get(url, params)
	},
    getSupplierDetail(params) {
        let url = TCHYURL + '/account/supplier/getDetails'
        return myaxios.get(url, params)
    },
    getContractDetail(params) {
        let url = TCHYURL + '/account/contract/supplier/detail'
        return myaxios.get(url, params)
    },
    deleteSupplierById(params) {
        let url = TCHYURL + '/account/supplier/batchDelete'
        return myaxios.get(url, params)
    },
    // 供应商对应货主合同列表
    getCorrespondingOwnerContract(params) {
        let url = TCHYURL + '/account/contract/cargo/contract/names'
        return myaxios.get(url, params)
    },
    //新增供应商
    addSupplier(params) {
        let url = TCHYURL + '/account/supplier/insert'
        return myaxios.post(url, params)
    },
    //编辑供应商 获取回填数据
    getEmitSupplierDetails(params) {
        let url = TCHYURL + '/account/supplier/getUpdateDetails'
        return myaxios.get(url, params)
    },
    //表单验证唯一性
    formUniqueness(params) {
        let url = TCHYURL + '/account/supplier/check_again'
        return myaxios.get(url, params)
    },
    //用户名验证唯一性
    accountUniqueness(params) {
        let url = TCHYURL + '/system/user/checkUserName'
        return myaxios.get(url, params)
    },
    //批量删除 和删除
    // deleteSupplierById(params) {
    //     let url = TCHYURL + '/account/supplier/batchDelete'
    //     return myaxios.get(url, params)
    // },
    //审核认证
    examineSupplier(params) {
        let url = TCHYURL + '/account/supplier/cert_audit'
        return myaxios.put(url, params)
    },
    //未审核拉入待审核状态
    waitAuditexamineSupplier(params) {
        let url = TCHYURL + '/account/supplier/auditing'
        return myaxios.put(url, params)
    },
    //供应商路线名称 详情信息
    getRouteItemDetails(params) {
        let url = TCHYURL + '/account/supplier/line/detail'
        return myaxios.get(url, params)
    },
    //编辑供应商
    emitSupplier(params) {
        let url = TCHYURL + '/account/supplier/update'
        return myaxios.put(url, params)
    },
    // 获取货主信息
    dropDownByOrder(params) {
        let url = TCHYURL + '/order/assistOrder/selfOwner'
        return myaxios.get(url, params)
    },
    // 获取项目信息
    project_down(params) {
        let url = TCHYURL + '/order/assistOrder/ownerProjectList'
        return myaxios.get(url, params)
    },
    // 获取车队信息
    dropDownFleet(params) {
        let url = TCHYURL + '/order/assistOrder/fleetList'
        return myaxios.get(url, params)
    },
    // 获取司机信息
    dropDownDriver(params) {
        let url = TCHYURL + '/order/assistOrder/changeFleetDriver'
        return myaxios.get(url, params)
    },
    // 获取线路信息
    userLineDownList(params) {
        let url = TCHYURL + '/order/assistOrder/userLineDownList'
        return myaxios.get(url, params)
    },
    // 获取线路信息
    userLineAddressList(params) {
        let url = TCHYURL + '/order/assistOrder/userLineAddressList'
        return myaxios.get(url, params)
    },
    // 新增供应商订单
    addOrderGoods(params) {
        let url = TCHYURL + '/order/assistOrder/assistCreateOrder'
        return myaxios.post(url, params)
    },

    // 获取车辆类型
    get_vehicle_model_list(params) {
        let url = TCHYURL + '/account/vehicle/get_vehicle_model_list'
        return myaxios.get(url, params)
    },
    // 平台协助建单列表
    getOrderList(params) {
        let url = TCHYURL + '/order/assistOrder/assistOrderList'
        return myaxios.get(url, params)
    },
    // 平台协助建单回显
    getUpdateDetail(params) {
        let url = TCHYURL + '/order/assistOrder/getUpdateDetail'
        return myaxios.get(url, params)
    },
    // 平台协助建单编辑
    updateOrderSelf(params) {
        let url = TCHYURL + '/order/assistOrder/updateOrderSelf'
        return myaxios.post(url, params)
    },
    // 平台协助建单一件发布
    releaseOrder(params) {
        let url = TCHYURL + '/order/assistOrder/releaseOrder'
        return myaxios.get(url, params)
    },
    // 平台协助建单取消
    orderCancel(params) {
        let url = TCHYURL + '/order/assistOrder/cancelOrder'
        return myaxios.get(url, params)
    },
    // 平台协助建单详情
    getDetail(params) {
        let url = TCHYURL + "/order/assistOrder/detailShipper";
        return myaxios.get(url, params);
    },
     // 是否开启车辆安全管理
    vehicleSafetyManagement(params) {
        let url = TCHYURL + "/account/supplier/updateIsShowCarManager";
        return myaxios.post(url, params);
    }
    






}
export default supplierManagementApi;